-
Notifications
You must be signed in to change notification settings - Fork 13.6k
More Printer
cleanups
#144949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
More Printer
cleanups
#144949
+186
−155
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The use of `print_value_path` means the value namespace is always used and the `guess_def_namespace` call is unnecessary. This commit removes the `guess_def_namespace` call and hard-codes `ValueNS`. It also changes the `print_value_path` to `print_def_path` for consistency with `def_path_str_with_args`.
Three of them are named `AbsolutePathPrinter`, which is confusing, so give those names that better indicate how they are used. And then there is `SymbolPrinter` and `SymbolMangler`, which are renamed as `LegacySymbolMangler` and `V0SymbolMangler`, better indicating their similarity.
- `same_path` can just be a `bool`. - `expected` and `found` are only needed inside the block. - Neaten a comment.
This comment has been minimized.
This comment has been minimized.
These details took me some time to work out.
…er`. It's not used in `Printer`.
I find these name clearer, and starting them all with `print_` makes things more consistent.
More consistency.
dd90af9
to
42a1042
Compare
davidtwco
approved these changes
Aug 13, 2025
@bors r+ rollup |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 13, 2025
… r=davidtwco More `Printer` cleanups A sequel to rust-lang#144776. r? `@davidtwco`
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 13, 2025
… r=davidtwco More `Printer` cleanups A sequel to rust-lang#144776. r? ``@davidtwco``
This was referenced Aug 13, 2025
bors
added a commit
that referenced
this pull request
Aug 13, 2025
Rollup of 9 pull requests Successful merges: - #144761 (aarch64: Make `outline-atomics` a known target feature) - #144949 (More `Printer` cleanups) - #144955 (search graph: lazily update parent goals) - #144962 (Add aarch64_be-unknown-none-softfloat target) - #145153 (Handle macros with multiple kinds, and improve errors) - #145241 ([AVR] Changed data_layout) - #145341 (Install libgccjit into the compiler's sysroot when cg_gcc is enabled) - #145349 (Correctly handle when there are no unstable items in the documented crate) - #145356 (Add another example for escaped `#` character in doctest in rustdoc book) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A sequel to #144776.
r? @davidtwco